GtkStack: Fix an oversight in child renaming
authorMatthias Clasen <mclasen@redhat.com>
Tue, 18 Nov 2014 12:36:16 +0000 (13:36 +0100)
committerMatthias Clasen <mclasen@redhat.com>
Tue, 18 Nov 2014 12:37:51 +0000 (13:37 +0100)
We currently emit a warning if you rename a child to the name
it already has. We shouldn't do that.

gtk/gtkstack.c

index 485d8a9cae427dae0eadc7a1245a42505d2d61fa..130426c58225268dbeab081494171b623e8eab43 100644 (file)
@@ -650,6 +650,8 @@ gtk_stack_set_child_property (GtkContainer *container,
       for (l = priv->children; l != NULL; l = l->next)
         {
           info2 = l->data;
+          if (info == info2)
+            continue;
           if (g_strcmp0 (info2->name, name) == 0)
             {
               g_warning ("Duplicate child name in GtkStack: %s\n", name);